<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<%@ Import Namespace="TeamCommunitySolution.Domain.DataLayer.Base" %>

<div class="topbar">
    <%
        if (Request.IsAuthenticated && !String.IsNullOrEmpty(Page.User.Identity.Name))
        {
            TeamCommunitySolution.Models.UserModel user = Session[TeamCommunitySolution.MvcApplication.UserIndex] as TeamCommunitySolution.Models.UserModel;
    %>
    <div style="float: left; width: 20%">
        <b><%= string.Format("{0} \"{1}\" {2}", user.FirstName, user.NickName, user.LastName) %></b>
    </div>
    <div style="float: right; width: 60%; text-align: right; padding-right: 10px;">
        [
        <%= Html.ActionLink("Control Panel", "Profile", "Account") %>
        ] [
        <%= Html.ActionLink("Log Off", "LogOff", "Account") %>
        ]
    </div>
    <%
        }
    %>
</div>
